<template>
	<view class="uiwu">
		<view class="uiwu-box">
			<image src="/static/nvhai.png" mode="aspectFill"></image>
			<view class="tips">将账号注销后，该账号将60天内无法注册本APP账户</view>
			<view class="title">以下信息将会被<text>清除且无法找回</text></view>
			<view class="content">
				· 账户金币余额被清空 <br>
				· 积分余额被清空<br>
				· 优惠券记录被清空<br>
				· 游戏记录被清空<br>
				· 抓中零食被清空<br>
				· 零食/兑换订单被清空<br>
				· 消费记录被清空等
			</view>
			<view class="btn">
				<text class="uiwu-flex-center" @tap.stop="TapLogOff">注销账号</text>
				<text></text>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { writeOffLogin } from '../../api/api';
	import { uiwu } from '../../config/config';
	const TapLogOff = async () : Promise<any> => {
		uiwu.loading('注销中...',true)
		const result = await writeOffLogin()
		if(!result) return 
		uiwu.hideloading()
		uiwu.toast('注销成功')
		setTimeout(()=>{ 
			uni.reLaunch({
				url:'/pages/login/login'
			})
		},400)
	}
</script>

<style lang="scss">
	page{
		background-color: #F6F6F6;
	}
	.uiwu{
		padding: 20rpx 24rpx;
	}
	.uiwu-box{
		background: url('../../static/logoff.png') no-repeat 0 0;
		background-size: 100% 100%;
		width: 100%;
		height: 1023rpx;
		padding: 1rpx 60rpx;
		position: relative;
		image{
			width: 128rpx;
			height: 128rpx;
			border-radius: 50%;
			margin: 72rpx auto 40rpx;
			display: block;
		}
		.tips{
			font-size: 24rpx;
			font-weight: 500;
			color: #999999;
		}
		.title{
			font-size: 32rpx;
			font-weight: 800;
			color: #231815;
			margin-top: 40rpx;
			text{
				color: #EF821E;
			}
		}
		.content{
			font-size: 28rpx;
			font-weight: 500;
			color: #444444;
			margin-top: 24rpx;
		}
		.btn{
			position: absolute;
			left: 0;
			right: 0;
			bottom: 150rpx;
			margin: 0 auto;
			width: 570rpx;
			text{
				width: 568rpx;
				height: 80rpx;
				background: #EF821E;
				border-radius: 40rpx;
				border: 3rpx solid #231815;
				position: absolute;
				left: -5rpx;
				top: -6rpx;
				z-index: 9;
				font-size: 32rpx;
				font-weight: bold;
				color: #FFFFFF;
				&:nth-child(2){
					z-index: 8;
					left: 5rpx;
					top: 6rpx;
					background: #FAC500;
				}
			}
		}
	}
</style>
